<template>
    <view style="height: 100%">
        <label class="product-price _span data-v-4141a40e">
            <label class="price _span data-v-4141a40e" v-if="!isHasDiscountPrice">
                <block v-if="money">
                    <label class="symbol _span data-v-4141a40e">￥</label>
                    {{ '' + $root.m0 + '' }}
                </block>
                <block v-if="money && score">+</block>
                <block v-if="score">
                    {{ '' + score + '' }}
                    <label class="symbol-text _span data-v-4141a40e">{{ scoreAlias }}</label>
                </block>
                <block v-if="!money && !score">￥0</block>
            </label>
            <block v-else>
                <label class="price _span data-v-4141a40e">
                    <block v-if="discountMoney">
                        <label class="symbol _span data-v-4141a40e">￥</label>
                        {{ $root.m1 + '' }}
                    </block>
                    <block v-if="discountMoney && discountScore">+</block>
                    <block v-if="discountScore">
                        {{ '' + discountScore + '' }}
                        <label class="symbol-text _span data-v-4141a40e">{{ scoreAlias }}</label>
                    </block>
                    <block v-if="discountMoney === 0 && discountScore === 0">￥0</block>
                </label>
                <label class="line-price _span data-v-4141a40e" style="padding-left: 10rpx">
                    <block v-if="money">{{ '￥' + $root.m2 }}</block>
                    <block v-if="money && score">+</block>
                    <block v-if="score">{{ score + ' ' + scoreAlias }}</block>
                </label>
            </block>
        </label>
    </view>
</template>

<script>
import tabBar from '@/components/TabBar/tabBar';
(global.webpackJsonp = global.webpackJsonp || []).push([
    ['components/PriceDisplay/PriceDisplay'],
    {
        '212d': function (n, t, e) {
            'use strict';

            function i(n) {
                return !!/^[0-9]+.?[0-9]*/.test(n);
            }
            Object.defineProperty(t, '__esModule', {
                value: true
            });
            t.default = void 0;
            var o = {
                props: {
                    info: {
                        type: Object,
                        default: function () {
                            return {};
                        }
                    },
                    theme: {
                        type: String,
                        default: function () {
                            return 'red';
                        }
                    },
                    moneyKey: {
                        type: String
                    },
                    scoreKey: {
                        type: String
                    },
                    prefix: {
                        type: String,
                        default: function () {
                            return '';
                        }
                    },
                    discountPrefix: {
                        type: String,
                        default: function () {
                            return 'discount_';
                        }
                    }
                },
                filters: {},
                methods: {
                    formatPrice: function (n) {
                        return (n / 100).toFixed(2);
                    }
                },
                computed: {
                    isHasDiscountPrice: function () {
                        return (i(this.discountMoney) || i(this.discountScore)) && (this.discountMoney != this.money || this.discountScore != this.score);
                    },
                    money: function () {
                        return this.info[this.moneyKey || this.prefix + 'money_price'];
                    },
                    score: function () {
                        return this.info[this.scoreKey || this.prefix + 'score_price'];
                    },
                    discountMoney: function () {
                        return this.info[this.discountPrefix + 'money_price'];
                    },
                    discountScore: function () {
                        return this.info[this.discountPrefix + 'score_price'];
                    }
                }
            };
            t.default = o;
        },
        6102: function (n, t, e) {
            'use strict';

            var i = e('7a72');
            e.n(i).a;
        },
        '6b05': function (n, t, e) {
            'use strict';

            e.r(t);
            var i = e('6c0d');
            var o = e('b8f2');
            for (var r in o) {
                if (['default'].indexOf(r) < 0) {
                    (function (n) {
                        e.d(t, n, function () {
                            return o[n];
                        });
                    })(r);
                }
            }
            e('6102');
            var c = e('f0c5');
            var s = Object(c.a)(o.default, i.b, i.c, false, null, '4141a40e', null, false, i.a, void 0);
            t.default = s.exports;
        },
        '6c0d': function (n, t, e) {
            'use strict';

            e.d(t, 'b', function () {
                return i;
            });
            e.d(t, 'c', function () {
                return o;
            });
            e.d(t, 'a', function () {});
            var i = function () {
                var that = this;
                var t = (that.$createElement, that._self._c, !that.isHasDiscountPrice && that.money ? that.formatPrice(that.money) : null);
                if (that.isHasDiscountPrice && that.discountMoney) {
                    var e = that.formatPrice(that.discountMoney);
                } else {
                    var e = null;
                }
                if (that.isHasDiscountPrice && that.money) {
                    var i = that.formatPrice(that.money);
                } else {
                    var i = null;
                }
                that.$mp.data = Object.assign(
                    {},
                    {
                        $root: {
                            m0: t,
                            m1: e,
                            m2: i
                        }
                    }
                );
            };
            var o = [];
        },
        '7a72': function (n, t, e) {},
        b8f2: function (n, t, e) {
            'use strict';

            e.r(t);
            var i = e('212d');
            var o = e.n(i);
            for (var r in i) {
                if (['default'].indexOf(r) < 0) {
                    (function (n) {
                        e.d(t, n, function () {
                            return i[n];
                        });
                    })(r);
                }
            }
            t.default = o.a;
        }
    }
]);
(global.webpackJsonp = global.webpackJsonp || []).push([
    'components/PriceDisplay/PriceDisplay-create-component',
    {
        'components/PriceDisplay/PriceDisplay-create-component': function (n, t, e) {
            e('543d').createComponent(e('6b05'));
        }
    },
    [['components/PriceDisplay/PriceDisplay-create-component']]
]);
</script>
<style>
@import './PriceDisplay.css';
</style>
